<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function buClick(){
            localStorage.setItem("name","勒布朗tom");
            location.href = "/html/b.html";
        }
    </script>
</head>
<body>
    <input type="button" value="点击" onclick="buClick()">
</body>
</html>